home *** CD-ROM | disk | FTP | other *** search
/ Chip: Hang es video / CHIP_ZENESZERKESZTO_2005.ISO / audio_3 / visual / robotfunk / setup.exe / {app} / main.dxr / ui_66.ls < prev    next >
Encoding:
Text File  |  2003-11-19  |  567 b   |  20 lines

  1. global curscript
  2.  
  3. on appendBehavior scr, spr
  4.   curscript = "appendbehaviour"
  5.   Class = script(scr)
  6.   obj = new(Class)
  7.   setaProp(obj, #spriteNum, spr)
  8.   initprops = call(#getPropertyDescriptionList, [Class])
  9.   if ilk(initprops) = #propList then
  10.     thisMany = count(initprops)
  11.     repeat with x = 1 to thisMany
  12.       thisProperty = getPropAt(initprops, x)
  13.       thisValue = getProp(initprops, thisProperty)
  14.       setProp(obj, thisProperty, thisValue.default)
  15.     end repeat
  16.   end if
  17.   set the scriptInstanceList of sprite spr to [obj]
  18.   call(#beginSprite, [obj])
  19. end
  20.